package com.fhz.a2102shopjava.ui.dashboard;

import androidx.lifecycle.LiveData;

import com.fhz.a2102shopjava.callback.ApiResponse;
import com.fhz.a2102shopjava.entity.Category;
import com.fhz.a2102shopjava.ui.mine.MineLocalDataSource;
import com.fhz.a2102shopjava.ui.mine.MineRemoteDataSource;

import java.util.List;

import javax.inject.Inject;

/**
 * 时间:2023/8/15
 *
 * @author Mr.Feng
 * 简述:
 */
public class DashboardRepository {

    @Inject
    DashboardLocalDataSource mDashboardLocalDataSource;
    @Inject
    DashboardRemoteDataSource mDashboardRemoteDataSource;

    @Inject
    public DashboardRepository(DashboardLocalDataSource dashboardLocalDataSource, DashboardRemoteDataSource dashboardRemoteDataSource) {
        mDashboardLocalDataSource = dashboardLocalDataSource;
        mDashboardRemoteDataSource = dashboardRemoteDataSource;
    }


    public LiveData<ApiResponse<List<Category>>> getCategory(int type){
        return mDashboardRemoteDataSource.getCategory(type);
    }


}

